/*
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 *
 * $Id: GammuEvent.java 656 2007-06-27 09:32:35Z jack.rybicki $
 */
package gammu.java;

import java.util.Map;

/**
 * The event can be produced to inform observers about a change (e.g. an
 * incoming message) in a monitored phone.
 * 
 */
public class GammuEvent {
	public enum GammuEventType {
		CALL, USSD, SMS, SB;
	}

	private final GammuEventType type;

	private final Map content;

	public GammuEvent(GammuEventType type, Map content) {
		this.type = type;
		this.content = content;
	}

	public Map getContent() {
		return content;
	}

	public GammuEventType getType() {
		return type;
	}

	/**
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		switch (type) {
		case CALL:
			return "CALL";
		case USSD:
			return "USSD";
		case SMS:
			return "SMS";
		case SB:
			return "SB";
		default:
			return "Unknown type";
		}
	}

}
